/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.Spring.Model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Schwanstei
 */
@Entity
@Table(name = "alumno")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Alumno.findAll", query = "SELECT a FROM Alumno a"),
    @NamedQuery(name = "Alumno.findByNoCuenta", query = "SELECT a FROM Alumno a WHERE a.noCuenta = :noCuenta"),
    @NamedQuery(name = "Alumno.findByIdDatos", query = "SELECT a FROM Alumno a WHERE a.idDatos = :idDatos"),
    @NamedQuery(name = "Alumno.findByIdFechas", query = "SELECT a FROM Alumno a WHERE a.idFechas = :idFechas"),
    @NamedQuery(name = "Alumno.findByIdCarrera", query = "SELECT a FROM Alumno a WHERE a.idCarrera = :idCarrera"),
    @NamedQuery(name = "Alumno.findByIdPersona", query = "SELECT a FROM Alumno a WHERE a.idPersona = :idPersona"),
    @NamedQuery(name = "Alumno.findByPasswordAlu", query = "SELECT a FROM Alumno a WHERE a.passwordAlu = :passwordAlu"),
    @NamedQuery(name = "Alumno.findByPromedio", query = "SELECT a FROM Alumno a WHERE a.promedio = :promedio"),
    @NamedQuery(name = "Alumno.findByGeneracion", query = "SELECT a FROM Alumno a WHERE a.generacion = :generacion")})
public class Alumno implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "no_cuenta")
    private Integer noCuenta;
    @Basic(optional = false)
    @Column(name = "id_datos")
    private int idDatos;
    @Basic(optional = false)
    @Column(name = "id_fechas")
    private int idFechas;
    @Basic(optional = false)
    @Column(name = "id_carrera")
    private int idCarrera;
    @Basic(optional = false)
    @Column(name = "id_persona")
    private int idPersona;
    @Column(name = "password_alu")
    private String passwordAlu;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "promedio")
    private Float promedio;
    @Column(name = "generacion")
    @Temporal(TemporalType.DATE)
    private Date generacion;

    public Alumno() {
    }

    public Alumno(Integer noCuenta) {
        this.noCuenta = noCuenta;
    }

    public Alumno(Integer noCuenta, int idDatos, int idFechas, int idCarrera, int idPersona) {
        this.noCuenta = noCuenta;
        this.idDatos = idDatos;
        this.idFechas = idFechas;
        this.idCarrera = idCarrera;
        this.idPersona = idPersona;
    }

    public Integer getNoCuenta() {
        return noCuenta;
    }

    public void setNoCuenta(Integer noCuenta) {
        this.noCuenta = noCuenta;
    }

    public int getIdDatos() {
        return idDatos;
    }

    public void setIdDatos(int idDatos) {
        this.idDatos = idDatos;
    }

    public int getIdFechas() {
        return idFechas;
    }

    public void setIdFechas(int idFechas) {
        this.idFechas = idFechas;
    }

    public int getIdCarrera() {
        return idCarrera;
    }

    public void setIdCarrera(int idCarrera) {
        this.idCarrera = idCarrera;
    }

    public int getIdPersona() {
        return idPersona;
    }

    public void setIdPersona(int idPersona) {
        this.idPersona = idPersona;
    }

    public String getPasswordAlu() {
        return passwordAlu;
    }

    public void setPasswordAlu(String passwordAlu) {
        this.passwordAlu = passwordAlu;
    }

    public Float getPromedio() {
        return promedio;
    }

    public void setPromedio(Float promedio) {
        this.promedio = promedio;
    }

    public Date getGeneracion() {
        return generacion;
    }

    public void setGeneracion(Date generacion) {
        this.generacion = generacion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (noCuenta != null ? noCuenta.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Alumno)) {
            return false;
        }
        Alumno other = (Alumno) object;
        if ((this.noCuenta == null && other.noCuenta != null) || (this.noCuenta != null && !this.noCuenta.equals(other.noCuenta))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Alumno[ noCuenta=" + noCuenta + " ]";
    }
    
}
